#ifndef __3DMODEL_H__
#define __3DMODEL_H__

#include <sys/stat.h> 
#include <OGLES/OGLESTools.h>
#include "GameEngine/OGLConfig/Screen.h"
#include "GameEngine/TextureManager.h"
#include "GameEngine/math/vec3f.h"

class Model3D{
public:
	Model3D(const char *filename);
	void DrawModel(PVRTMATRIXf m_mView);
private:
	CPVRTModelPOD	model;
	GLuint*			m_TexID;
	GLuint*			m_puiVbo;
	GLuint*			m_puiIndexVbo;
	VERTTYPE		m_fFrame;


	bool isIndexedFaces;
	bool isInterleaved;

	bool genVBO();
	bool loadTextures();

	static void init();
	static bool isInited;

	static PVRTMATRIX cameraCorrection;
	
	VERTTYPE m_fAngle;
};

#endif
